Calculus of variations engineering mathematics